import React, { Component } from 'react'
import MyNavLin from '../MyNavLink'
import { Route, Redirect } from 'react-router-dom'
import News from './News'
import Message from './Message'
export default class index extends Component {
    render() {
        return (
            <div>
                这是home页面
     
                <MyNavLin to="/home/news" >点击跳转到news页面</MyNavLin>
                <MyNavLin to="/home/message" >点击跳转到message页面</MyNavLin>
              <div>
                <Route path="/home/news" component={News} />
                <Route path="/home/message" component={Message} />
                <Redirect to="/home/news" />
              </div>

            </div>
        )
    }
}
